<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/7/19
 * Time: 16:04
 */
namespace Publish\Controller;
use Common\Controller\HomebaseController;
include '../Common/function.php';
class InfirstdexController extends HomebaseController
{
    protected $terms_model;

    function _initialize() {
        parent::_initialize();
        $this->terms_model = D("Publish/SystemTerms");
    }
       public function index(){
//      unset($_SESSION['videos']);
//      dump($_SESSION['videos']);
//      exit;
//        $keyword=$_POST('keyword');
       
        $aa=isMobile();
        if($aa){
            $where['parent']=array('EQ','0');
            // $where['term_id']=array('NEQ','72');
            $where['term_id']=array(array('NEQ','72'),array('NEQ','75'));
            $term_list=$this->terms_model
                ->field('name,term_id')
                ->where($where)
                ->order("listorder desc,term_id asc")
                ->select();
            // dump($term_list);
            $this->assign("terms",$term_list);
            $this->display("index_m");
        }else{
            $term_list=$this->terms_model
                ->field('name')
                ->where(array("parent"=>0))
                ->order("listorder desc,term_id asc")
                ->select();
            $this->assign("terms",$term_list);
            $this->display();
        }
    }
}